﻿using System.Data;
using ZhCun.DbCore.Entitys;

namespace ZhCun.WebCommon.DBModels
{
    public class P_ExecBase: ProcEntityBase
    {
        const int SUCCESS_CODE = 8888;
        /// <summary>
        /// 是否执行成功，OutRetValue 返回 8888
        /// </summary>
        [ProcParam(NotParameter = true)]
        public bool Success
        {
            get
            {
                return OutRetValue == SUCCESS_CODE;
            }
        }
        /// <summary>
        /// 用于输出执行的结果代码，8888为成功
        /// </summary>
        [ProcParam(ParamDirection = ParameterDirection.Output)]
        public int OutRetValue { set; get; }
        /// <summary>
        /// 御用输出执行结果的信息内容，OutRetValue != 8888 时有效
        /// </summary>
        [ProcParam(ParamDirection = ParameterDirection.Output)]
        public string ErrMsg { set; get; }
    }
}
